package com.gzcstec.user.utils;

import java.util.Random;

/**
 * 主键工具类
 */
public class KeyUtils {

    private KeyUtils(){}

    public static synchronized String getUniqueKey() {
        //当前时间戳+0000000位随机数
        Random random = new Random();
        Integer number = random.nextInt(9000000) + 1000000;
        return System.currentTimeMillis() + String.valueOf(number);
    }
}
